package com.dongdongshop.service.impl;

import com.dongdongshop.dao.EvaluateDao;
import com.dongdongshop.pojo.evaluate.Evaluate;
import com.dongdongshop.service.evaluate.EvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Eayon
 * @Date 2020/4/3 21:11
 */
@Service
public class EvaluateServiceImpl implements EvaluateService {

    @Autowired
    private EvaluateDao evaluateDao;

    @Override
    public void addEvaluate(Evaluate evaluate) {
        evaluateDao.addEvaluate(evaluate);
    }

    @Override
    public List<Evaluate> findByGoodsId(Long goodsId) {
        return evaluateDao.findByGoodsId(goodsId);
    }

    @Override
    public void incLikeNum(Integer id) {
        evaluateDao.incLikeNum(id);
    }
}
